package ru.niir.goodfil.c1;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

@XStreamAlias("Client")
public class Client
{
    //
    //  Информация для импорта ИЗ 1С
    //

    @XStreamAsAttribute
    private String id1C = "";

    @XStreamAsAttribute
    private long idIS;

    //
    //  Информация для импорта в 1С
    //

    @XStreamAsAttribute
    private String name;

    @XStreamAsAttribute
    private String managerFIO;

    @XStreamAsAttribute
    @XStreamAlias("BankDebt")
    private String debtBank;

    @XStreamAsAttribute
    @XStreamAlias("CashDebt")
    private String debtCash;

    @XStreamAsAttribute
    private String priceColumn;

    @XStreamAsAttribute
    @XStreamAlias("Block")
    private String c1Block;

    public Client()
    {
    }

    public Client(String id1C, long idIS, String priceColumn, String c1Block)
    {
        this.id1C = id1C;
        this.idIS = idIS;
        this.priceColumn = priceColumn;
        this.c1Block = c1Block;
    }

    public Client(String id1C, long idIS)
    {
        this.id1C = id1C;
        this.idIS = idIS;
        this.priceColumn = null;
        this.c1Block = "";
    }

    public Client(Object id1C, long idIS)
    {
        this.id1C = id1C.toString();
        this.idIS = idIS;
        this.priceColumn = null;
        this.c1Block = "";
    }

    public Client(Object id1C, long idIS, String priceColumn)
    {
        this.id1C = id1C.toString();
        this.idIS = idIS;
        this.priceColumn = priceColumn;
        this.c1Block = "";
    }

    public String getId1C()
    {
        return id1C;
    }

    public void setId1C(String id1C)
    {
        this.id1C = id1C;
    }

    public long getIdIS()
    {
        return idIS;
    }

    public void setIdIS(long idIS)
    {
        this.idIS = idIS;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getManagerFIO()
    {
        return managerFIO;
    }

    public void setManagerFIO(String managerFIO)
    {
        this.managerFIO = managerFIO;
    }

    public String getDebtBank()
    {
        return debtBank;
    }

    public void setDebtBank(String debtBank)
    {
        this.debtBank = debtBank;
    }

    public String getDebtCash()
    {
        return debtCash;
    }

    public void setDebtCash(String debtCash)
    {
        this.debtCash = debtCash;
    }

    public String getPriceColumn() {
        return priceColumn;
    }

    public void setPriceColumn(String priceColumn) {
        this.priceColumn = priceColumn;
    }

    public String getC1Block() {
        return c1Block;
    }

    public void setC1Block(String c1Block) {
        this.c1Block = c1Block;
    }

    @Override
    public String toString()
    {
        return "Client{" +
               "id1C='" + id1C + '\'' +
               ", idIS=" + idIS +
               ", name='" + name + '\'' +
               ", managerFIO='" + managerFIO + '\'' +
                ", priceColumn='" + priceColumn + '\'' +
               ", debtBank='" + debtBank + '\'' +
               ", debtCash='" + debtCash + '\'' +
                ", c1Block='" + c1Block + '\'' +
               '}';
    }
}
